<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>1-3</title>
</head>
<body>

</body>
</html><!DOCTYPE html>
<html lang="en">>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            font:12px/1.5 Tahoma;
            text-align:center;
        }
        code,input,button{
            font-family:inherit;
        }
        input{
            border:1px solid #ccc;
            padding:3px;
        }
        button{
            cursor:pointer;
        }
    </style>
    <script>
        var myFn = function(a,b){
            alert(a.value);
            alert(b.value);
        };

        window.onload = function(){
            var oInput = document.getElementsByTagName("input");
            var oButton = document.getElementsByTagName("button")[0];
            oButton.onclick = function(){
                myFn(oInput[0],oInput[1]);
            }
        };
    </script>
</head>
<body>
<p><input type="text" value="北京市"/></p>
<p><input type="text" value="朝阳区"/></p>
<p><button>传参</button></p>
</body>
</html>
